package com.googlecode.javatestcomparison;

import java.util.List;

public class Service
{
   private static Service instance;
   protected Search search;
   
   public Service()
   {
      search = new Search();
   }
   
   public Service(Search search)
   {
      this.search = search;
   }
   
   public static Service getInstance()
   {
      if (instance == null) instance = new Service();
      
      return instance;
   }
   
   public List<Item> search(String criteria)
   {
      return search.by(criteria);
   }
}
